//
//  MemoryManager.h
//  atomtrace
//
//  Created by Yuntao Ou on 4/20/14.
//  Copyright (c) 2014 Yuntao Ou. All rights reserved.
//

#ifndef __ATOMTRACE_MEMORY_MANAGER_H_
#define __ATOMTRACE_MEMORY_MANAGER_H_

#include "atUtil.h"
#include "PhotonMap.h"

namespace AtomTrace {
    inline int GetPhotonMapAddr();
    inline int GetHitPointMapAddr();
    
    // ********* Inline functions **************
    int GetPhotonMapAddr()
	{ return GetMemoryEndAddr(); }
    
    int GetHitPointMapAddr()
    {
        int pht_size = sizeof(Photon) / 4;
        int pm_addr = GetPhotonMapAddr();
        
        return (pm_addr+1 + pht_size * GetMaxNumberOfPhotons() +1);
    }

}

#endif //__ATOMTRACE_MEMORY_MANAGER_H_
